home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Communications / Internet / TurboTCP 2.1 ƒ / PP helper classes / CTCPSessionDocPP.h < prev   
Encoding:
Text File  |  1995-01-18  |  2.1 KB  |  65 lines  |  [TEXT/MMCC]

  1. //
  2. // CTCPSessionDocPP.h
  3. //
  4. //    TurboTCP library
  5. //    TCP session document
  6. //    PowerPlant-specific class
  7. //
  8. //    Copyright © 1993-95, FrostByte Design / Eric Scouten
  9. //
  10.  
  11. #pragma once
  12.  
  13. #include "TurboTCP.buildflags.h"
  14.  
  15. #if !TurboTCP_PP
  16.     #error: This file should be used with PowerPlant projects only!
  17. #endif
  18.  
  19. #include "CTCPEndpoint.h"
  20. #include <LSingleDoc.h>
  21.  
  22.  
  23. //***********************************************************
  24.  
  25. class CTCPSessionDocPP : public LSingleDoc, public CTCPEndpoint {
  26.  
  27. // This abstract class is provided to link the PowerPlant LSingleDoc class with the TurboTCP
  28. // CTCPStream class. View this as a “connection session” document; this is the point at
  29. // which the user interaction with the TCP session is handled.
  30.  
  31. // This class provides all of the necessary behaviors for opening and closing a session.
  32. // It provides abstract methods for receiving data and handling various TCP notifications.
  33. // By default, it sets the window title to the name of the remote host. You may also
  34. // configure it to show the document’s filename, both hostname & filename, or neither.
  35. // (See the fields showFileName and showHostName and the method AutoTitle.
  36.  
  37. // This class does not implement any specific TCP protocol. You will need to subclass it
  38. // to provide the behaviors specific to the protocol you are implementing. You may want
  39. // to examine and use the CTelnetTerminal class in MiniTelnet to see how this may be done.
  40.  
  41.     
  42. public:
  43.                     CTCPSessionDocPP(LCommander* inSuper,
  44.                         unsigned short theDefaultPort,
  45.                         unsigned long recBufferSize = recReceiveSize,
  46.                         unsigned short autoReceiveSize = recAutoRecSize,
  47.                         unsigned short autoReceiveNum = recAutoRecNum,
  48.                         Boolean doUseCName = true);
  49.                     CTCPSessionDocPP(unsigned short theDefaultPort,
  50.                         unsigned long recBufferSize = recReceiveSize,
  51.                         unsigned short autoReceiveSize = recAutoRecSize,
  52.                         unsigned short autoReceiveNum = recAutoRecNum,
  53.                         Boolean doUseCName = true);
  54.  
  55.     // closing windows & sessions
  56.  
  57.     virtual void        AttemptClose(Boolean inRecordIt);
  58.     virtual void        RemoteClose();
  59.  
  60.     // window titling
  61.  
  62.     virtual void        GetFileName(Str255 theName);
  63.     virtual void        SetWindowTitle(Str255 newTitle);
  64.  
  65. };